<?php
/**
 * Created by PhpStorm.
 * User: banfuguang
 * Date: 2017/9/12
 * Time: 17:36
 */
?>

<div class="product-form">
    <div style="float: left;width: 540px;">
        <div class="form-group field-addnew-postid" style="padding-top:10px" id="addnew-form">
            <div class="row">
                <div class="col-sm-3">
                    <label class="">post id</label>
                </div>
                <div class="col-sm-9">
                    <input id="addnew-dataid" class="form-control" name="addnew[dataid]" type="hidden" value="<?= $dataid;?>">
                    <input id="addnew-postid" class="form-control" name="addnew[postid]" maxlength="500" aria-required="true" type="text">
                    <div class="help-block"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>
public static function bannerNum(){
$num = NewsBanner::find()->where(['status' => 0])->count();
return $num;
}

public static function hasListBanner(){
$num = NewsBanner::find()->where(['status' => 0,'position' => 1])->count();
return $num;
}
[['title','image','newsurl','status','position'], 'required'],